<!--
 * @Author: HeAo
 * @Date: 2021-12-14 14:26:20
 * @LastEditTime: 2021-12-14 14:46:15
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \甘肃农大-2021-12-12\study\day02\3-浮动布局.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      background-color: cadetblue;
    }

    .container>div {
      width: 200px;
      height: 200px;
      /* background-color: orange; */
      margin: 10px;
      border: 1px solid #333;
    }

    .container::after {
      /* 表现形式为块级元素 */
      display: block;
      /* 内容为空 */
      content: '';
      /* 清除左右两侧浮动 */
      clear: both;
    }

    #one {
      float: left;
      background-color: orange;
      /* margin-left: 200px; */
    }

    #two {
      float: left;
      background-color: red;
      /* margin-left: 100px; */
    }

    #three {
      float: left;
      background-color: green;
      /* margin-left: 200px; */
    }
  </style>
</head>

<body>
  <div class="container">
    <div id="one"></div>
    <div id="two"></div>
    <div id="three"></div>
  </div>
</body>

</html>